home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld Secrets (4th Edition)
/
Mac Secrets CD 4th Ed.toast
/
Shareware & Freeware
/
KeyQuencer 1.2.2
/
Developer’s toolkit
/
Common code
/
Extension.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-16
|
1KB
|
47 lines
//==============================================================================
// DOCUMENTATION AVAILABLE IN THE EXTENSION.H AND ACTION.H HEADERS
#include "A4Globals.h"
#include "Extension.h"
#include "Action.h"
//==============================================================================
// MAIN ENTRY POINT AND MESSAGE DISPATCHER
pascal short main(long message, ParamsPtr params, MachineHandle mac, GluePtr glue)
{
long world;
short error;
MAIN_SETUP_GLOBALS(world);
switch(message)
{
case kExtMessageRun:
error = run(params, mac, glue);
break;
case kExtMessageInit:
error = init(params, mac, glue);
break;
}
MAIN_RESTORE_GLOBALS(world);
return error;
}
//==============================================================================
// GLOBAL STORAGE FOR TRAP PATCHES AND CALLBACKS (see Action.h)
long SetupExtensionWorld(void)
{
long world;
TEMP_SETUP_GLOBALS(world);
return world;
}
void RestoreExtensionWorld(long world)
{
TEMP_RESTORE_GLOBALS(world);
}
//==============================================================================